﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace RCREEE.Library.Entities
{
    public class AdjustSpecificYear
    {

        #region EnergyConsumptionDevelopment Methods

        public DataTable GetEnergyConsumptionColumns()
        {
            DataTable dtColumnNames = DataManager.GetColumnNames("EnergyConsumptionDevelopment");
            if (dtColumnNames != null)
            {
                // remove last two rows
                dtColumnNames.Rows.RemoveAt(dtColumnNames.Rows.Count - 1);
                dtColumnNames.Rows.RemoveAt(dtColumnNames.Rows.Count - 1);

                return dtColumnNames;
            }
            return null;
        }

        public bool AddEnergyConsumptionColumn(string ColumnName)
        {
            return DataManager.AddColumn(ColumnName, "EnergyConsumptionDevelopment");
        }

        public bool RemoveEnergyConsumptionColumn(string ColumnName)
        {
            return DataManager.RemoveColumn(ColumnName, "EnergyConsumptionDevelopment");
        }

        #endregion

        #region Strategic Objective Methods
        
        public DataTable GetStrategicObjectivesColumns()
        {
            DataTable dtColumnNames = DataManager.GetColumnNames("StrategicObjectives");
            if (dtColumnNames != null)
            {
                // remove last five rows
                dtColumnNames.Rows.RemoveAt(dtColumnNames.Rows.Count - 1);
                dtColumnNames.Rows.RemoveAt(dtColumnNames.Rows.Count - 1);
                dtColumnNames.Rows.RemoveAt(dtColumnNames.Rows.Count - 1);
                dtColumnNames.Rows.RemoveAt(dtColumnNames.Rows.Count - 1);
                dtColumnNames.Rows.RemoveAt(dtColumnNames.Rows.Count - 1);

                return dtColumnNames;
            }
            return null;
        }

        public bool AddStrategicObjectiveColumn(string ColumnName)
        {
            return DataManager.AddColumn(ColumnName, "StrategicObjectives");
        }

        public bool RemoveStrategicObjectiveColumn(string ColumnName)
        {
            return DataManager.RemoveColumn(ColumnName, "StrategicObjectives");
        }

        #endregion

    }
}
